home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / RGASM.RAR / ASMCODE.EXE / CHAPT10 / READYPRN.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-05-10  |  638 b   |  20 lines

  1. ;       Program ReadyPrn ( Chapter 10 )
  2. ;
  3.     page    55,132
  4. .model  tiny    
  5. .stack
  6. .data
  7. .code
  8.     org     100h
  9. .startup        
  10.     mov     ah,2            ; function 03h - get printer status byte
  11.     mov     dx,0            ; DX=0 corresponds to LPT1 
  12.     int     17h             ; BIOS printer service  
  13.     mov     al,1            ; set return code to 1
  14.     cmp     ah,80h          ; check bit 7 of status byte
  15.     je      ExProg          ; if printer is OK - exit program
  16.     mov     al,0            ; else set return code to 0
  17. ExProg: mov     ah,4Ch          ; function 4Ch - exit program
  18.     int     21h             ; DOS service call
  19.     end
  20.